import {createRouter, createWebHashHistory, createWebHistory} from "vue-router"
import mainpage from '../components/mainpage'
import predict from '../components/predict'
import sentiment from '../components/sentiment'
import stockquery from '../components/stockquery'
import MyStock from "../components/stock"


const routes = [
        {
            path: "/",
            name: "mainpage",
            component: mainpage
        },
        {
            path: "/predict",
            name: "predict",
            component: predict
        },
        {
            path: "/sentiment",
            name: "sentiment",
            component: sentiment
        },
        {
            path: "/stockquery",
            name: "stockquery",
            component: stockquery
        }
    ]

  const router = createRouter({
    // 4. 采用hash 模式
    history: createWebHashHistory(),
    // 采用 history 模式
    // history: createWebHistory(),
    routes, //使用上方定义的路由配置
  });

  export default router
